package com.irononetech.android.Webservice;

import java.net.URL;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class WebServiceObject {
	private URL url;
	private String visitId = "";
	private String code;
	private String xmlText;
	private String description="Description not available!";
	private String error;
	private boolean successful = false;
	static Logger LOG = LoggerFactory.getLogger(WebServiceObject.class);

	
	public boolean isSuccessful() {
		return successful;
	}

	public void setSuccessful(boolean successful) {
		this.successful = successful;
	}

	public String getError() {
		return error;
	}

	public void setError(String error) {
		this.error = error;
		
		if(error == null || error.isEmpty()){
			error = "Network Failed!";
		}
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getXmlText() {
		return xmlText;
	}

	public void setXmlText(String xmlText) {
		LOG.info("Server Responce: " + xmlText);
		this.xmlText = xmlText;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public URL getUrl() {
		return url;
	}

	public void setUrl(URL url) {
		this.url = url;
	}
	
	public String getVisitId() {
		return visitId;
	}

	public void setVisitId(String vId) {
		visitId = vId;
	}
}